package com.example.openapi.generator.controller;


import com.example.openapi.generator.model.User;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;

import java.util.ArrayList;
import java.util.List;

@RestController
@RequestMapping("/api/users")
@Tag(name = "UserController", description = "用户CRUD操作接口")
public class UserController {

    // 模拟数据库存储
    private final List<User> users = new ArrayList<>();

    @GetMapping("/getAllUsers")
    public List<User> getAllUsers() {
        return users;
    }

    @GetMapping("/{id}")
    public ResponseEntity<User> getUserById(@PathVariable Long id ) {
        return ResponseEntity.notFound().build();
    }

}
